<template>
    <el-dialog v-model="show" :show-close="false" @open="handleOpen" class="app-dialog">
        <div class="app-dialog__header">
            <div class="app-dialog__title">{{ title }}</div>
            <img src="@/assets/del-default.png" @click="show = false" style="width: 18px;height: 18px;cursor: pointer;">
        </div>

        <div class="app-dialog__body">
            <el-scrollbar max-height="63vh">
                <slot></slot>
            </el-scrollbar>
        </div>

        <div class="app-dialog__footer">
            <slot name="footer"></slot>
        </div>
    </el-dialog>
</template>
<script setup>
const show = defineModel({ type: Boolean })

const props = defineProps({
    title: String,
})
</script>
<style lang="scss" scoped>
.app-dialog__header {
    display: flex;
    align-items: center;
    background-color: #fafafa;
    line-height: 40px;
    padding: 0 16px;

}

.app-dialog__title {
    flex: 1;
    font-size: 16px;
    font-weight: 600;
    color: #333;
}

.app-dialog__body {
    padding: 40px 40px 22px 40px;
}

.app-dialog__footer {
    display: flex;
    align-items: center;
    justify-content: center;
    padding-bottom: 40px;
    padding-top: 16px;
}
</style>

<style lang="scss">
.app-dialog {
    padding: 0;
    border-radius: 0;
    overflow: hidden;

    .el-dialog__header {
        display: none;
    }
}
</style>